/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ucab.desarrollo.viajesbook;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 *
 * @author Ju4nC4rlos
 */
public class InicializarSpring {

    private static final String APPLICATION_CONTEXT_FILE =  "applicationContext.xml";

    private static ApplicationContext contexto;

    private static InicializarSpring gestionSpring;

    public static InicializarSpring getSingleton() {

        if (null==gestionSpring)
        {
            gestionSpring= new InicializarSpring();
        }
        return gestionSpring;
    }

    /**
     * @return the contexto
     */
    public ApplicationContext getContexto() {
        return contexto;
    }

    private InicializarSpring(){
        contexto = new FileSystemXmlApplicationContext(APPLICATION_CONTEXT_FILE);
    }

}
